package com.iotechn.unimall.admin.api.leaseOrder;
import com.iotechn.unimall.core.Const;
import com.iotechn.unimall.core.annotation.HttpMethod;
import com.iotechn.unimall.core.annotation.HttpOpenApi;
import com.iotechn.unimall.core.annotation.HttpParam;
import com.iotechn.unimall.core.annotation.HttpParamType;
import com.iotechn.unimall.core.annotation.param.NotNull;
import com.iotechn.unimall.core.exception.ServiceException;
import com.iotechn.unimall.data.domain.LeaseOrderDO;
import com.iotechn.unimall.data.model.Page;
import java.util.Map;

/**
 *
 *
 * @author hct
 * @email 77802226@qq.com
 * @date 2020-07-21 22:35:48
 */
@HttpOpenApi(group = "admin.leaseOrder", description = "")
public interface AdminLeaseOrderService {

    @HttpMethod(description = "列表", permission = "list", permissionParentName = "一分田", permissionName = "售卖管理")
    Page<LeaseOrderDO> list(
            @HttpParam(name = "pageNo", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页长度", valueDef = "20") Integer limit,
            @HttpParam(name = "orderNo", type = HttpParamType.COMMON, description = "订单号") String orderNo,
            @HttpParam(name = "channel", type = HttpParamType.COMMON, description = "通道") String channel,
            @HttpParam(name = "phone", type = HttpParamType.COMMON, description = "手机号") String phone,
            @HttpParam(name = "landNo", type = HttpParamType.COMMON, description = "土地编号") String landNo,
            @HttpParam(name = "title", type = HttpParamType.COMMON, description = "标题") String title,
            @HttpParam(name = "price", type = HttpParamType.COMMON, description = "价格") Integer price,
            @HttpParam(name = "status", type = HttpParamType.COMMON, description = "价格") Integer status,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

//    @HttpMethod(description = "修改", permission = "operation:leaseorder:update", permissionParentName = "一分田", permissionName = "修改")
//    String update(
//            @NotNull @HttpParam(name = "leaseOrderDO", type = HttpParamType.COMMON, description = "") LeaseOrderDO leaseOrderDO,
//            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "删除", permission = "generator:leaseorder:delete", permissionParentName = "一分田", permissionName = "售卖管理")
    String cancel(
            @NotNull @HttpParam(name = "orderNo", type = HttpParamType.COMMON, description = "删除Id") String orderNo,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "详情", permission = "operation:leaseorder:detail", permissionParentName = "一分田", permissionName = "售卖管理")
    LeaseOrderDO detail(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "Id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "自定义退款", permission = "operation:order:customrefund", permissionParentName = "一分田", permissionName = "售卖管理")
    String customRefund(
            @NotNull @HttpParam(name = "orderNo", type = HttpParamType.COMMON, description = "订单号") String orderNo,
            @NotNull @HttpParam(name = "sum", type = HttpParamType.COMMON, description = "退款金额") Integer sum,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员Id") Long adminId) throws ServiceException;

}

